import Layout from "@/layout/index";

/** 公共组件介绍 */
const componentsRouter = {
  path: "/components",
  name: "Components",
  component: Layout,
  redirect: "noRedirect",
  meta: {
    title: "公共组件",
    roles: ["other"],
  },
  children: [
    {
      path: "/demo",
      name: "Demo",
      meta: {
        title: "Demo",
        keepAlive: true,
        requireAuth: true,
        roles: ["other"],
      },
      component: () => import("@/views/demo/index"),
    },
    {
      path: "/detail",
      name: "Detail",
      meta: {
        title: "Detail",
        keepAlive: true,
        requireAuth: true,
        roles: ["other"],
      },
      component: () => import("@/views/demo-detail/index"),
    },
    {
      path: "/utils-demo",
      name: "Utils",
      meta: {
        title: "Utils",
        keepAlive: true,
        requireAuth: true,
        roles: ["other"],
      },
      component: () => import("@/views/utils-demo/index"),
    },
  ],
};

export default componentsRouter;
